import {Component, OnInit, Input, ViewEncapsulation} from '@angular/core';
import {ImageServeService} from "@shared/service/image/image-serve.service";

@Component({
  selector: 'seed-default-graph',
  templateUrl: './default-graph.component.html',
  styleUrls: ['./default-graph.component.scss'],
  encapsulation: ViewEncapsulation.None
})
export class DefaultGraphComponent implements OnInit {
  public _text: string;
  public _defalutUrl: string;

  @Input()
  set text(text: string) {
    this._text = text;
  }

  get text() {
    return this._text;
  }

  @Input()
  set url(url: string) {
    this._defalutUrl = this.imaService.getDefaultGraph(url);
  }

  get url() {
    return this._defalutUrl;
  }

  constructor(private imaService: ImageServeService) {
    this.text = '暂无内容';
    this.url = 'train';
  }


  ngOnInit() {

  }

}
